package kr.or.javacafe.common.util;

import org.springframework.context.support.MessageSourceAccessor;

public class PropertiesAccessor {

	private static MessageSourceAccessor messageSource;

    public void setMessageSource(MessageSourceAccessor newMessageSourceAccessor) 
    {
        messageSource = newMessageSourceAccessor;
    }
      
    public static MessageSourceAccessor getAccessor()
    {
    	return messageSource;
    }

    public static String getMessage(String key)
    {
    	try
    	{
    		return messageSource.getMessage(key);
    	}catch(Exception e)
    	{
    		return ""; 
    	}
    }

}
  